package com.lone.smallmovie.service.impl;

import com.lone.smallmovie.dao.SmsCodeDao;
import com.lone.smallmovie.model.SmsCode;
import com.lone.smallmovie.service.SmsCodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SmsCodeServiceImpl implements SmsCodeService {

    @Autowired
    private SmsCodeDao smsCodeDao;

    public int sendSmsCode(String mobileNumber,String smsCode) {
        return smsCodeDao.sendSmsCode(mobileNumber,smsCode);
    }

    public int updateSmsCodeStatus(String mobileNumber,String smsCode) {
        return smsCodeDao.updateSmsCodeStatus(mobileNumber,smsCode);
    }

    public SmsCode querySmsCodeByMobileNumber(String mobileNumber,String smsCode) {
        return smsCodeDao.querySmsCodeByMobileNumber(mobileNumber, smsCode);
    }
}
